Skip to main content

All Questions

2votes
3answers
422views

I need to use sed in Linux to find a portion of a line in XML and update a value in it?

I have a requirement to update a variable value in XML with a fixed value once there is a partial match in XML using sed on Linux. Example: Input value: <Table tableName="Data" primaryKey=...
Debajit Dutta's user avatar
-1votes
2answers
128views

Match the pattern and if the pattern is found then comment the tag based on line number

I have the input XML file which looks like below INPUT XML FILE <Formula> <Name>Total Hate Fee</Name> <Code>1234> <Job>BO</Job> <Type>sub</Type> </...
Piyush Chakraborty's user avatar
130votes
13answers
187kviews

Replace environment variables in a file with their actual values?

Is there an easy way to substitute/evaluate environment variables in a file? Like let's say I have a file config.xml that contains: <property> <name>instanceId</name> <...
Robert Fraser's user avatar
0votes
3answers
2kviews

Remove string with spaces and quotes from xml file

I would like to remove the string currencyId="GBP" from an xml file. Please note there is a single space before the first letter c. I am having trouble parsing the data and removing this string ...
neilH's user avatar
2votes
4answers
2kviews

Modify an SVG file based on information in a CSV file

I've got a SVG file of the map of the US and I want to add colors to it. Because it would take me to much time, I thought I could use a bash script. I have also another file containing the states and ...
M-Reda Daoudi's user avatar
1vote
2answers
994views

How to remove a line from a tag in shell script?

We have an xml file (abc_lop.xml) in which I need to remove a line which is present in a tag: Below is an xml file, I have shorten it down as it is very big. <HELLO version="4.2" xmlns="http://...
user1950349's user avatar

close